<link type="text/css" rel="stylesheet" href="{url:#css/ucenter.css}" />
{echo:JS::import('form');}
{echo:JS::import('date');}
<div class="mt10 clearfix" style="position: relative;">
	{widget:name=sub_navs action=ucsidebar sidebar=$sidebar act=$actionId}
	<div class="content clearfix uc-content">
		<div class="box p10">
			<h1 class="title"><span>修改密码：</span></h1>
			{if:isset($msg)}
			<div class="message_{$msg[0]} ie6png">{$msg[1]}</div>
			{elseif:isset($validator)}
			<div class="message_warning ie6png">{$validator['msg']}</div>
			{/if}
			<div class="mt10">
				<form id="info-form" class="simple" action="{url:/ucenter/password_save}" method="post">
				<table class="form">
					<tr>
			        	<td class="label">旧密码：</td><td><input type="password" pattern="required" name="oldpassword" alt="原账户密码"> <label></label></td>
			        </tr>
			        <tr>
			        	<td class="label">新密码：</td><td><input type="password" pattern="required" name="password" bind="repassword" minlen="6" maxlen="20" value="" alt="密码长度6-20个字符"> <label></label></td>
			        </tr>
			        <tr>
			        	<td class="label">确认密码：</td><td><input type="password" pattern="required" name="repassword" bind="password" minlen="6" maxlen="20" value="" alt="密码长度6-20个字符"> <label></label></td>
			        </tr>
			        <tr>
			        	<td colspan="2" class="tc"><input type="submit" class="btn" value="保存" ></td>
			        </tr>
				</table>
				{token:}
			</form>
			</div>

		</div>
	</div>
</div>

<script type="text/javascript">
var form =  new Form('info-form');
form.setValue('is_default','{$is_default}');
  $("#areas").Linkage({ url:"{url:/ajax/area_data}",selected:[{$province|0},{$city|0},{$county|0}],callback:function(data){
    var text = new Array();
    var value = new Array();
    for(i in data[0]){
      if(data[0][i]!=0){
        text.push(data[1][i]);
        value.push(data[0][i]);
      }
    }
    $("#test").val(value.join(','));
    FireEvent(document.getElementById("test"),"change");
    }});
    {if:isset($invalid)}
  	autoValidate.showMsg({id:$("input[name='{$invalid['name']}']").get(0),error:true,msg:'{$invalid['msg']}'});
  {/if}
</script> 